

list01 = [33,24,55,16,78]

def indexs(vl):
    for i in range(len(vl)):
        yield i, vl[i]


for i, c in indexs(list01):
    print(i, c)

# 将多个列表的每个元素合成一个元组
ls = ["孙悟空", "猪八戒", "唐僧", "沙僧"]
ls1 = [101, 102, 103, 104]
def my_zip(*args):
    for i in range(len(args[0])):
        ls = []
        for c in args:
            ls.append(c[i])
        yield tuple(ls)


for j in my_zip(ls, ls1):
    print(j)